package com.hhkj.open.sys.controller;

import com.hhkj.open.sys.model.req.LoginReq;
import com.hhkj.open.sys.service.biz.OpenSysUserService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * OpenSystemController
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/7/10 9:13
 */
@RestController
@RequestMapping("/open/admin")
public class OpenSystemController extends BaseController
{
    @Autowired
    private OpenSysUserService userService;

    /** 登录接口 */
    @PostMapping("/login")
    public AjaxResult login(@Validated @RequestBody LoginReq req)
    {
        return AjaxResult.successData(userService.login(req));
    }
}
